import request from '/@/utils/request';

/**
 * 批量操作API接口
 */
// 批量操作结果接口
export interface BatchOperationResult {
	/** 错误代码 */
	Code?: Number;
	/** 错误信息 */
	Message?: string;
	/** 返回数据 */
	Data?: string;
}

/**
 * 批量操作API工厂函数
 */
function batchOperationsApi() {
	return {
		/**
		 * 批量分配岗位申请单
		 */
		batchJobAssignment: (data: any): Promise<BatchOperationResult> => {
			return request({
				url: '/api/SysPerson/BatchAssignJobs',
				method: 'post',
				data,
			});
		},
		/**
		 * 批量分配岗位
		 */
		batchJobAssignmentRequestBillEntry: (data: any): Promise<BatchOperationResult> => {
			return request({
				url: '/api/SysHrJobAssignmentRequestBillEntry/BatchAssignPositions',
				method: 'post',
				data,
			});
		},
	};
}

export { batchOperationsApi };
export default batchOperationsApi;
